Skip to content

fix(cli): state the 100-row server cap in incident feed and alert timeline --limit flag help - #147

Merged
ysyneu merged 1 commit into
mainfrom
feed-limit-cap
Aug 14, 2026
Merged

fix(cli): state the 100-row server cap in incident feed and alert timeline --limit flag help#147
ysyneu merged 1 commit into
mainfrom
feed-limit-cap

Conversation

@ysyneu

@ysyneu ysyneu commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

The incident feed and alert timeline endpoints reject limit > 100 with InvalidParameter: Limit must be 100 or less, but the CLI's --limit flag help said only "Max events" — a caller only discovers the cap by hitting the 400. Same class as #138, which added the same note to alert list, alert-event list, and insight incident-export.

This mirrors #138's mechanism (flag-help text only) onto the two remaining feed-style verbs:

  • incident feed --limit (internal/cli/incident.go)
  • alert timeline --limit (internal/cli/alert.go)

The 100 cap is confirmed by the OpenAPI schema bundled in go-flashduty: ListIncidentFeedRequest.limit ("maximum": 100) and AlertFeedRequest.limit ("Page size, max 100, default 20").

incident timeline (the unpaginated variant) has no --limit flag and is unaffected.

Verification: make (format + lint + go test -race ./... + build) is green; built binary shows --limit int Max events (max 100) (default 20) for both verbs; make gen-cards produces no diff (flag usage strings aren't embedded in the generated fences, same as #138 noted).

@ysyneu
ysyneu merged commit ff14421 into main Aug 14, 2026
12 checks passed
@ysyneu
ysyneu deleted the feed-limit-cap branch August 14, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant